{layout name="public::layout" /}

<h4 class="text-success text-center">文章管理</h4>

<table class="table table-striped table-hover text-center">
	<tr>
		<td>ID</td>
		<td>标题</td>
		<td>栏目</td>
		{eq name="$Think.session.is_admin" value="1"}
		<td>作者</td>
		{/eq}
		<td>阅读量</td>
		<td>创建时间</td>
		<td colspan="2">操作</td>
	</tr>
	{volist name="artList" id="art" empty="$empty"}
	<tr>
		<td>{$art.id}</td>
		<td class="text-left">{$art.title}</td>
		<td>{$art.cate_id|getCateName}</td>

		{eq name="$Think.session.is_admin" value="1"}
		<td>{$art.user_id|getUserName}</td>
		{/eq}
		<td>{$art.pv}</td>
		<td>{$art.create_time}</td>
		
		<td><a href="{:url('article/artEdit',['id'=>$art.id])}">编辑</a></td>
		<td><a href="" onclick="dele({$art.id});return false;">删除</a></td>
	</tr>
	{/volist}
</table>

<!-- 显示分页条 -->
<div class="text-center">{$artList|raw}</div>


<script>
	function dele(id)
	{
		if(confirm('您真的要删除吗?') == true){
			window.location.href = "{:url('article/doDelete')}"+"?id="+id;			
		}
	}
</script>





